// tabBarComponent/tabBar.js
const app = getApp();
Component({
  properties: {
    tabbar: {
      type: Object,
    }
  },
  data: {
    isIphoneX: app.globalData.isIphoneX? true : false
  },
  methods: {
    choseNav:function(e){
      const {list} = this.data.tabbar;
      const sindex = e.currentTarget.dataset.sindex
      wx.switchTab({
        url: list[sindex].pagePath
      })
    }
  }
})
